<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>org.camunda.commons</groupId>
  <artifactId>camunda-commons-typed-values</artifactId>
  <name>camunda Commons - Typed Values</name>

  <parent>
    <groupId>org.camunda.bpm</groupId>
    <artifactId>camunda-database-settings</artifactId>
    <relativePath>../database</relativePath>
    <version>7.20.0-SNAPSHOT</version>
  </parent>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.camunda.bpm</groupId>
        <artifactId>camunda-core-internal-dependencies</artifactId>
        <version>${project.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <properties>
    <camunda.artifact>org.camunda.bpm.engine.variable</camunda.artifact>
    <camunda.osgi.import.additional>
      !javax.activation
    </camunda.osgi.import.additional>
  </properties>
  <dependencies>

    <dependency>
      <groupId>org.camunda.commons</groupId>
      <artifactId>camunda-commons-utils</artifactId>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.sun.activation</groupId>
      <artifactId>javax.activation</artifactId>
      <version>1.2.0</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-bpm-archunit</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
        <configuration>
          <comparisonVersion>${camunda.version.old}</comparisonVersion>
          <logResults>true</logResults>
          <excludes>
            <exclude>org/camunda/bpm/engine/impl/**</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <id>all</id>
            <phase>verify</phase>
            <goals>
              <goal>check-no-fork</goal>
            </goals>
            <configuration>
              <textOutputFile>${project.build.directory}/clirr-all.txt</textOutputFile>
              <failOnWarning>false</failOnWarning>
              <failOnError>false</failOnError>
              <ignored>
                <difference>
                  <differenceType>8001</differenceType>
                  <className>camundajar/com/sun/activation/**/*</className>
                </difference>
                <difference>
                  <differenceType>8001</differenceType>
                  <className>camundajar/javax/activation/**/*</className>
                </difference>
              </ignored>
            </configuration>
          </execution>
          <execution>
            <id>restrictive</id>
            <phase>verify</phase>
            <goals>
              <goal>check-no-fork</goal>
            </goals>
            <configuration>
              <textOutputFile>${project.build.directory}/clirr-restrictive.txt</textOutputFile>
              <failOnWarning>true</failOnWarning>
              <ignoredDifferencesFile>.clirr-jenkins-ignore.xml</ignoredDifferencesFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
              <artifactSet>
                <includes>
                  <include>com.sun.activation:javax.activation</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>com.sun.activation</pattern>
                  <shadedPattern>camundajar.com.sun.activation</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javax.activation</pattern>
                  <shadedPattern>camundajar.javax.activation</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>cleanVersions</goal>
            </goals>
          </execution>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <dependenciesToScan>
            <dependency>org.camunda.bpm:camunda-bpm-archunit</dependency>
          </dependenciesToScan>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
